package com.yhn.bubblevideo.video.controller;

import com.yhn.bubblevideo.common.model.BaseResponse;
import com.yhn.bubblevideo.common.model.ResultUtils;
import com.yhn.bubblevideo.model.dto.resp.VideoRespDTO;
import com.yhn.bubblevideo.video.service.VideoService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yhn
 * @version 1.0
 * @description
 * @date 2025/3/5 14:12
 */
@RestController
@RequestMapping("/info")
public class VideoInfoController {
    @Resource
    private VideoService videoService;

    @GetMapping("/user/videos")
    public BaseResponse<List<VideoRespDTO>> getUserVideo(Long userId) {
        return ResultUtils.success(videoService.getUserVideo(userId));
    }
}
